// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /sysPermission/addMenu */
export async function addMenu(body: UserService.SysPermission, options?: { [key: string]: any }) {
  return request<UserService.ResultString>(`/user/sysPermission/addMenu`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysPermission/allMenu */
export async function getAllMenu(options?: { [key: string]: any }) {
  return request<UserService.ResultListSysPermission>(`/user/sysPermission/allMenu`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /sysPermission/deleteMenu/${param0} */
export async function deleteMenu(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.deleteMenuParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<UserService.ResultString>(`/user/sysPermission/deleteMenu/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysPermission/getMenuById/${param0} */
export async function getMenuById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.getMenuByIdParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<UserService.ResultSysPermission>(`/user/sysPermission/getMenuById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysPermission/getUserMenu */
export async function getUserMenu(options?: { [key: string]: any }) {
  return request<UserService.ResultListSysPermission>(`/user/sysPermission/getUserMenu`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /sysPermission/updateMenu */
export async function updateMenu(
  body: UserService.SysPermission,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultString>(`/user/sysPermission/updateMenu`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
